#header-only library
kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-hub/wil
    REF v1.0.240122.1
    SHA512 7d20b8bbfced741077a64b4bc6084fef1b068f742a41af252d772042c5ea5ba934f019d987a1938b8333a324d2e5bfab313b059ceef20440888c7e5f5b419457
    HEAD_REF master
)

# WIL is header-only, so we don't need to build it in both modes
set(KMPKG_BUILD_TYPE release)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DWIL_BUILD_TESTS=OFF
        -DWIL_BUILD_PACKAGING=ON
)

kmpkg_cmake_install()

kmpkg_cmake_config_fixup(CONFIG_PATH share/cmake/WIL)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

# Install natvis files
file(INSTALL "${SOURCE_PATH}/natvis/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/natvis")

# Install copyright
kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")